/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-03-29
 * Time: 16:30
 */
public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();

        int ret = mySingleList.size();
        System.out.println(ret);

        mySingleList.disPlay();
        System.out.println();

        mySingleList.addFirst(8);
        mySingleList.disPlay();
        System.out.println();

        mySingleList.addLast(20);
        mySingleList.disPlay();
        System.out.println();

        mySingleList.addIndex(2,66);
        mySingleList.disPlay();
        System.out.println();

        boolean ret2 = mySingleList.contains(66);
        System.out.println(ret2);

        mySingleList.remove(66);
        mySingleList.disPlay();
        System.out.println();

        mySingleList.addFirst(9);
        mySingleList.addIndex(1,9);
        mySingleList.addIndex(2,9);
        mySingleList.addIndex(5,9);
        mySingleList.disPlay();
        System.out.println();

        mySingleList.removeAllKey(9);//removeALLKey

        mySingleList.disPlay();
        System.out.println();

        mySingleList.clear();
        mySingleList.disPlay();
        System.out.println();
        mySingleList.addFirst(1);
        mySingleList.disPlay();
    }
}
